<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>${webConfig.name}</title>
    <link rel="stylesheet" href="${s.base}/site/css/bootstrap.css"/>
    <link rel="stylesheet" href="${s.base}/site/css/css.css"/>
    <link rel="stylesheet" type="text/css" href="${s.base}/site/css/style.css"/>
</head>
<style>
	body,html{
		padding-top: 45px;
	}
</style>
<body>
<!--头部-->
<header class="intou">
	<div class="intou1 after">
		<div class="inlogo">
			<a href="javascript:void(0)"><img src="${webConfig.coverImage}" /> </a>
		</div>
		<div class="inselect">
			<select onchange="changePage(this)">
				<#list hostCityList as city>
					<option <#if city.id==currentCity.id>selected</#if> value="${city.id}">${city.name}</option>
				</#list>
			</select>
		</div>
		<ul class="intouul after">
			<#list webNavigationList as webNavigation>
				<#if webNavigation.url?contains("?")>
					<li><a href="${webNavigation.url}&navId=${webNavigation.id}&cityId=${cityId}">${webNavigation.name}</a></li>
					<#else>
						<li><a href="${webNavigation.url}?navId=${webNavigation.id}&cityId=${cityId}">${webNavigation.name}</a></li>
				</#if>
			</#list>
		</ul>
		<div class="intou2 after">
			服务热线
			<span>${webConfig.telephone}</span>
		</div>
	</div>
</header>
<div class="inbanner">
	<img src="${s.base}/site/images/inbanner.jpg" />
	<div class="insecch">
		<p>买房</p>
		<div class="after">
			<div class="insecchm1">
				<input type="text" placeholder="输入商圈、小区或楼盘名开始找房" id="search" /><span id="searchBtn">搜索</span>
			</div>
		</div>
	</div>
</div>
<div class="inm1">
	<div class="incenter">
		<p class="in_p1">热卖新房 <a href="${s.base}/site/#">查看更多 ></a>  </p>
	</div>
	<div class="inlb1">
		<div id="myCarousel" class="carousel slide"> 
			<!-- 轮播（Carousel）项目 -->
			<div class="carousel-inner">
				<div class="item active">
					<div class="inlb_ul after">
						<#list hostItemList as hostItem>
							<#if hostItem_index lt 3>
								<div class="inlb_li">
									<a href="/webPc/item?id=${hostItem.id}&navId=${navId!'20190812144332008524389852868791'}">
										<div class="inlb_img">
											<img src="${hostItem.coverImage}"  style="width: 446px; height: 288px;"/>
											<i><img src="${s.base}/site/images/in3.png" /> </i>
											<p>${hostItem.name}</p>
											<p>${hostItem.price}元/m2 <span>${hostItem.cityName}-${hostItem.areaName}</span></p>
										</div>
										<div class="inlb_text">
											<p>${hostItem.name}</p>
											<p>均价：${hostItem.price}元/m2</p>
											<p>户型面积：${hostItem.minApartmentArea}-${hostItem.maxApartmentArea}m2</p>
										</div>
									</a>
								</div>
							</#if>
						</#list>
					</div>
				</div>
				<div class="item">
					<div class="inlb_ul after">
						<#list hostItemList as hostItem>
							<#if (hostItem_index lt 5) && (hostItem_index gt 2) >
								<div class="inlb_li">
									<a href="/webPc/item?id=${hostItem.id}&navId=${navId!'20190812144332008524389852868791'}">
										<div class="inlb_img">
											<img src="${hostItem.coverImage}" style="width: 446px; height: 288px;"/>
											<i><img src="${s.base}/site/images/in3.png" /> </i>
											<p>${hostItem.name}</p>
											<p>${hostItem.price}元/m2 <span>${hostItem.cityName}-${hostItem.areaName}</span></p>
										</div>
										<div class="inlb_text">
											<p>${hostItem.name}</p>
											<p>均价：${hostItem.price}元/m2</p>
											<p>户型面积：${hostItem.minApartmentArea}-${hostItem.maxApartmentArea}m2</p>
										</div>
									</a>
								</div>
							</#if>
						</#list>
					</div>
				</div>
			</div>
			<!-- 轮播（Carousel）导航 -->
			<a class="left carousel-control" href="${s.base}/site/#myCarousel" role="button" data-slide="prev">
			</a>
			<a class="right carousel-control" href="${s.base}/site/#myCarousel" role="button" data-slide="next">
			</a>
		</div> 
	</div>
</div>
<div class="inm2 incenter after">
	<div class="inm2_le">
		<p class="in_p1">悦淘新房</p>
		<div class="inm2_le_text">
			<p class="inm2_p1">热搜楼盘</p>
			<#list hostItemList as hostItem>
				<#if (hostItem_index+1) == hostItemList?size>
					<a href="/webPc/item?id=${hostItem.id}&navId=${navId!'20190812144332008524389852868791'}">${hostItem.name}</a>
					<#else>
						<a href="/webPc/item?id=${hostItem.id}&navId=${navId!'20190812144332008524389852868791'}">${hostItem.name}     |</a>
				</#if>

			</#list>
		</div>
		<div class="inm2_le_img">
			<a href="${s.base}/site/#">
				<img src="${s.base}/site/images/in3.jpg" />
			</a>
		</div>
	</div>
	<div class="inm2_ri">
		<p class="inm2_p2">
			<#list hostTypeList as hostType>
				<#if hostType.id = currentHostType.id>
					<span data-id="${hostType.id}" class="on">${hostType.name}</span>
					<#else>
						<span  data-id="${hostType.id}">${hostType.name}</span>
				</#if>
			</#list>
			<a href="${s.base}/site/#">查看更多 ></a>
		</p>
		<div class="inm2_tab after" id="rmtjShow">


		</div>
	</div>
</div>

<div class="inm4 after incenter">
	<div class="inm4_le">
		<img src="${s.base}/site/images/in4.jpg" />
	</div>
	<div class="inm4_ri after">
		<a href="${s.base}/site/#">
			<div class="inm4_ri1">
				<p>积分商城</p>
				<p>体验专属特权</p>
			</div>
			<div class="inm4_ri2">
				<img src="${s.base}/site/images/in5.jpg" />
			</div>
		</a>
	</div>
</div>
<div class="inm5 after">
	<div class="inm5_le">
		<img src="${s.base}/site/images/in7.jpg" />
	</div>
	<div class="inm5_ri">
		<p class="inm5_p1">关于我们</p>
		<div class="inm5_ri_text">
			<p class="inm5_p2">品牌介绍</p>
			<p class="inm5_p3">用心打造完美个性家居环境</p>
			<p class="inm5_p4">这里是品牌介绍的相关文字，你才会那就是掉你看好似我欧安慰佛牌欧普二娃欧派安徽各回各家凉快这里是品牌介绍的相关文字这里是品牌介绍的相关文字这里是品牌介绍的相关文字；管理科收购价搜谱u阿卡丽</p>
			<p class="inm5_p5"><a href="${s.base}/site/#"> MORE > </a></p>
		</div>
	</div>
</div>

<!--底部-->
<footer>
	<div class="hyfoot0 ">
		<div class="hyfootm1 after">
			<div class="hyfoot_le">
				<p class="hyfoot_p1">快速通道</p>
				<p class="hyfoot_p2"><span class="on" data-id="1">城市楼盘</span><span data-id="2">城市小区</span><span data-id="3">城市房价</span><span data-id="4">热门房产网</span></p>
				<div class="hyfoot_tab">
					<ul class="hyfoot_ul" id="linkeShow">
					</ul>
				</div>
			</div>
			<div class="hyfoot_ri after">
				<div class="hyfoot_ri1">
					<p class="hyfoot_p1">联系我们</p>
					<#list webLinkerList as webLinker>
						<p class="hyfoot_p3"><a href="${webLinker.url}">${webLinker.name}</a> </p>
					</#list>
				</div>
				<div class="hyfoot_ri2">
					<p class="hyfoot_p4">服务声明邮箱: ${webConfig.email} </p>
					<p class="hyfoot_p5">服务热线: <span>${webConfig.telephone}</span> </p>
					<div class="hyfootewm after">
						<div>
							<img src="${s.base}/site/images/foot.jpg" />
							<p>关注微信</p> 
						</div>
						<div>
							<img src="${s.base}/site/images/foot1.jpg" />
							<p>下载APP</p>
						</div>
					</div>
				</div>

				
			</div>
		</div>
	</div>
	<div class="hyfoot01">${webConfig.copyright}</div>
</footer>
<script type="text/javascript" src="${s.base}/site/js/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="${s.base}/site/js/bootstrap.min.js"></script>
<script src="${s.base}/site/js/component.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" src="${s.base}/site/js/window_port.js"></script>
<script>
    var currentCityId='${currentCity.id}';
    var currentHostTypeId='${currentHostType.id}';
    var navId="${navId!'20190812144332008524389852868791'}";
    $(document).ready(function(e) {
        $("#searchBtn").bind("click",function () {
            changeHost(currentHostTypeId);
        });
        changeHost(currentHostTypeId);
        linke(1);
    });
$(".intouul li").eq(0).addClass("on")
	//	新房切换
$('.inm2_p2 span').click(function(){
	$(this).addClass('on').siblings().removeClass('on');
    var dataId=$(this).attr("data-id");
    changeHost(dataId);
})

//	底部切换
	$('.hyfoot_p2 span').click(function(){
		$(this).addClass('on').siblings().removeClass('on');
        var dataId=$(this).attr("data-id");
        linke(dataId);
	})

	//友情链接 友情链接:1、城市楼盘，2、城市小区，3、城市房价、4、热门房产网,5、联系我们
	function linke(linkeType) {
        $("#linkeShow").html("");
        $.post("/webPc/linker", {'linkeType':linkeType}, function (result) {
            if (result.code === 0) {
                //操作成功
                if (result.data != null && result.data.length > 0) {
                    var str="";
                    for(var i=0;i<result.data.length;i++){
                        var obj=result.data[i];
                        if(i%7==0&&i==0){
                            str+="<li>"
						}else if(i%7==0){
                            str+="</li><li>"
						}
                        str+='<a href="'+obj.url+'" target="_blank">'+obj.name+'</a>';
					}
                    str+="</li>";
                    $("#linkeShow").html(str);
                }
            } else {
                //操作失败
				console.log(result.msg);
            }
        }, "json");
    }
	//改变城市
	function changePage(obj) {
		window.location.href="/webPc/index?cityId="+$(obj).val();
    }
	//改变选择房屋类型
    function changeHost(currentHostTypeId) {
        $("#rmtjShow").html("");
        var search=$("#search").val();
        $.post("/weChat/hostItem/page", {'pageNum':0,'pageSize':30,'name':search,'cityId':currentCityId,'hostType':currentHostTypeId}, function (result) {
            if (result.code === 0) {
                //操作成功
                if (result.data != null && result.data.length > 0) {
                    result.data.forEach(function (item,key,mapObj) {
                        var str='<div class="inm2_tab1"><a href="/webPc/item?id='+item.id+'&navId='+navId+'"> '+
                            '<img src="'+item.coverImage+'" style="width: 330px; height: 230px;" />'+
                            '<p class="inm2_p3"><span>'+item.name+'</span><i>'+item.price+' <em>元/m2</em> </i></p>'+
                            '<p class="inm2_p4">'+item.minRooms+'-'+item.maxRooms+'室&nbsp;|&nbsp;'+item.minApartmentArea+'-'+item.maxApartmentArea+'m2<i style="float: right;font-style: normal;">'+item.cityName+'-'+item.areaName+'</i></p>'+
                        	'<p class="inm2_p4">';
                        if(item.tag!=null&&item.tag!=""&&item.tag!="null"){
                            var tags=item.tag.split(",");
                            for(var i=0;i<tags.length;i++){
                                str+='<span>'+tags[i]+'</span>';
                            }
                        }
                        var img="/image/avatar_default.jpg";
                        if(item.userLogo!=null&&item.userLogo!=""){
                            img=item.userLogo;
                        }
                        str+='</p><p class="inm2_p5"><img src="'+img+'" style="width: 36px; height: 36px; border-radius: 18px;" />'+item.userName+'发布房源图片</p>'+
                        '</a></div>';
                        $("#rmtjShow").append(str);
                    });
                }
            } else {
                //操作失败
				alert(result.msg);
            }
        }, "json");

    }

</script>

</body>
</html>
